<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>netaddr.address</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="netaddr-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >netaddr</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="netaddr-module.html">Package&nbsp;netaddr</a> ::
        Module&nbsp;address
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="netaddr.address-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module address</h1><p class="nomargin-top"><span class="codelink"><a href="netaddr.address-pysrc.html">source&nbsp;code</a></span></p>
<p>network addresses and associated aggregates (CIDR, Wilcard, etc).</p>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Classes</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.address.Addr-class.html" class="summary-name">Addr</a><br />
      The base class containing common functionality for all subclasses 
        representing various network address types.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.address.EUI-class.html" class="summary-name">EUI</a><br />
      EUI objects represent IEEE Extended Unique Identifiers.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.address.IP-class.html" class="summary-name">IP</a><br />
      A class whose objects represent Internet Protocol network 
        addresses.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.address.AddrRange-class.html" class="summary-name">AddrRange</a><br />
      A block of contiguous network addresses bounded by an arbitrary 
        start and stop address.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.address.CIDR-class.html" class="summary-name">CIDR</a><br />
      A block of contiguous IPv4 or IPv6 network addresses defined by a 
        base network address and a bitmask prefix or subnet mask address 
        indicating the size/extent of the subnet.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.address.Wildcard-class.html" class="summary-name">Wildcard</a><br />
      A block of contiguous IPv4 network addresses defined using a 
        wildcard style syntax.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Functions</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="netaddr.address-module.html#nrange" class="summary-sig-name">nrange</a>(<span class="summary-sig-arg">start</span>,
        <span class="summary-sig-arg">stop</span>,
        <span class="summary-sig-arg">step</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">klass</span>=<span class="summary-sig-default">None</span>)</span><br />
      A generator producing sequences of network addresses based on start 
      and stop values, in intervals of step.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="netaddr.address-pysrc.html#nrange">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="netaddr.address-module.html#abbrev_to_cidr" class="summary-sig-name">abbrev_to_cidr</a>(<span class="summary-sig-arg">addr</span>)</span><br />
      Returns:
      A verbose CIDR from an abbreviated CIDR or old-style classful network
      address, <code>None</code> if format provided was not recognised or 
      supported.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="netaddr.address-pysrc.html#abbrev_to_cidr">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="nrange"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">nrange</span>(<span class="sig-arg">start</span>,
        <span class="sig-arg">stop</span>,
        <span class="sig-arg">step</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">klass</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="netaddr.address-pysrc.html#nrange">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>A generator producing sequences of network addresses based on start 
  and stop values, in intervals of step.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>start</code></strong> - first network address as string or instance of <a 
          href="netaddr.address.Addr-class.html" class="link">Addr</a> 
          (sub)class.</li>
        <li><strong class="pname"><code>stop</code></strong> - last network address as string or instance of <a 
          href="netaddr.address.Addr-class.html" class="link">Addr</a> 
          (sub)class.</li>
        <li><strong class="pname"><code>step</code></strong> - (optional) size of step between addresses in range. Default is 1.</li>
        <li><strong class="pname"><code>klass</code></strong> - (optional) the class used to create objects returned. Default: <a
          href="netaddr.address.Addr-class.html" class="link">Addr</a> 
          class.
          <ul>
            <li>
              <code>str</code> returns string representation of network 
              address
            </li>
            <li>
              <code>int</code>, <code>long</code> and <code>hex</code> 
              return expected values
            </li>
            <li>
              <a href="netaddr.address.Addr-class.html" 
              class="link">Addr</a> (sub)class or duck type* return objects
              of that class. If you use your own duck class, make sure you 
              handle both arguments <code>(addr_value, addr_type)</code> 
              passed to the constructor.
            </li>
          </ul></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="abbrev_to_cidr"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">abbrev_to_cidr</span>(<span class="sig-arg">addr</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="netaddr.address-pysrc.html#abbrev_to_cidr">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>addr</code></strong> - an abbreviated CIDR network address.
          <p>Uses the old-style classful IP address rules to decide on a 
          default subnet prefix if one is not explicitly provided.</p>
          <p>Only supports IPv4 and IPv4 mapped IPv6 addresses.</p>
          <p>Examples :</p>
<pre class="literalblock">
   10                  - 10.0.0.0/8
   10/16               - 10.0.0.0/16
   128                 - 128.0.0.0/16
   128/8               - 128.0.0.0/8
   192.168             - 192.168.0.0/16
   ::192.168           - ::192.168.0.0/128
   ::ffff:192.168/120  - ::ffff:192.168.0.0/120
</pre></li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>A verbose CIDR from an abbreviated CIDR or old-style classful 
          network address, <code>None</code> if format provided was not 
          recognised or supported.</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="netaddr-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >netaddr</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Aug  7 22:21:37 2008
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
